import previewImg from './previewImg.vue';
let defultOptions = {
  activeIndex: 0, //索引
  imgList: [], //图片list
}
previewImg.install = (Vue) => {
  let lTemp = Vue.extend(previewImg);
  let $vm = new lTemp();
  let tpl = $vm.$mount().$el;
  document.body.appendChild(tpl);
  Vue.prototype.$previewImg = function (options) {
    let curOptions = {...defultOptions};
    $vm.options = Object.assign(curOptions, options);
    $vm.isShowPreview = true;
  }
  Vue.prototype.$previewImg.hide = function () {
    $vm.isShowPreview = false;
  }
}
export default previewImg;
